<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript 能够改变 HTML 内容</title>
</head>
<body>
    <h2>JavaScript能够做什么？</h2>
    <p id="demo">JavaScript能够改变html内容</p>    
    <button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>点击我！</button></body>
</html> 